<template>
	<!-- 主题讨论 抢答 未参与学生列表 -->
    <page-body>
        <view class="page">
            <view class="flex benben-position-layout flex flex-wrap align-center flex_0_ibhf" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex flex-wrap align-center justify-between flex-sub fd0_0_ibhf'>
                    <view class='flex flex-wrap align-center fd0_0_c0_ibhf' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
                        <text class='fu-iconfont2  fd0_0_c0_c0_ibhf'>&#xE794;</text>
                    </view>
                    <view class='flex flex-wrap align-stretch justify-center'>
                        <text class='fd0_0_c1_c0_ibhf'>未参与学生</text>
                    </view>
                    <view class='flex flex-wrap align-center justify-end fd0_0_c0_ibhf'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
            <!---flex布局flex布局开始-->
            <view class="flex benben-flex-layout flex-wrap align-center flex_1_ibhf">
            </view>

            <!---flex布局flex布局结束-->
            <!---flex布局2flex布局开始-->
            <view class="flex flex-wrap align-center benben-flex-layout flex_2_ibhf">
                <text>共</text>
                <text class='fd2_1_ibhf'>{{list.length}}</text>
                <text>人</text>
            </view>

            <!---flex布局2flex布局结束-->
            <!---flex布局3flex布局开始-->
            <view class="flex flex-direction align-stretch benben-flex-layout">
                <template v-for='(item,key0) in list'  v-if="list.length>0 && isok">
                    <view class='flex flex-wrap align-center fd3_0_ibhf' :key='key0'>
                        <image class='fd3_0_c0_ibhf' mode="aspectFit" :src='item.avatar?item.avatar:STATIC_URL+"LOGO.png"'></image>
                        <text class='fd3_0_c1_ibhf hid1'>{{item.user_real_name}}</text>
                    </view>
                </template>
				<view class="imhs" v-if="list.length==0 && isok">
					<image class="" src="/static/images/none.png" mode=""></image>
					<view class="">
						暂无数据
					</view>
				</view>

            </view>

            <!---flex布局3flex布局结束-->


        </view>
    </page-body>
</template>
<script>
    export default {
        components: {},


        data() {
            return {
				aid:'',
				isok:false,
                "list": [],
				name:'',//抢答 主题讨论
            };
        },
        computed: {

        },
        watch: {},
        onLoad(options) {
			this.aid=options.aid
			this.name=options.name
			this.getlist()
            if (global.appTabBarType) this.toHomeDiy()
        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {

        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
			//获取学生列表
			async getlist() {
				this.isok=false
				
				let url=''
				let obj={}	
				if(this.name=='主题讨论'){
					url=global.apiUrls.post6916e2553cfa1
					obj={
						classroomactivitieslog_id: this.aid,
					}
				}else if(this.name=='抢答'){
					url=global.apiUrls.post69169a5008934
					obj={
						activitieslog_id: this.aid,
					}
				}
				let res = await this.$api.post(url,obj );
				this.isok=true
				if (res.data.code != 1) {
					this.$message.info(res.data.msg);
					return
				}
				if (res.data.data.length == 0) {
					this.list = []
					return
				}
				this.list = res.data.data.map(item => {
					item.check = false
					return item
				})
			},
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: var(--benbenbgColor1);
        background-size: 100% auto;

        .fd3_0_ibhf {
            height: 132rpx;
            padding: 26rpx 24rpx 26rpx 24rpx;

            .fd3_0_c0_ibhf {
                width: 80rpx;
                height: 80rpx;
                border-radius: 40rpx;
                margin: 0rpx 28rpx 0rpx 0rpx;
            }

            .fd3_0_c1_ibhf {
				max-width: 500rpx;
                color: #333333;
                font-size: 32rpx;
                font-weight: 500;
                line-height: 45rpx;
                text-align: left;
                font-style: normal;
            }
        }

        .flex_2_ibhf {
            width: 750rpx;
            height: 96rpx;
            background: #FBFBFB;
            padding: 0rpx 24rpx 0rpx 24rpx;

            .fd2_1_ibhf {
                color: rgba(249, 51, 53, 1);
            }
        }

        .flex_1_ibhf {
            height: 24rpx;
            width: 100%;
            background: rgba(248, 248, 248, 1);
            background-size: 100% auto;
        }

        .flex_0_ibhf {
            width: 750rpx;
            height: 88rpx;
            overflow: hidden;
            z-index: 10;
            top: 0rpx;
            background: #fff;
            background-size: 100% auto !important;

            .fd0_0_ibhf {
                padding: 0rpx 32rpx 0rpx 32rpx;

                .fd0_0_c1_c0_ibhf {
                    font-size: 36rpx;
                    font-weight: 700;
                    color: #333333;
                    line-height: 50rpx;
                }
            }
        }

        .fd0_0_c0_ibhf {
            width: 120rpx;

            .fd0_0_c0_c0_ibhf {
                font-size: 36rpx;
                color: #333;
            }
        }
    }
	.imhs{
		width: 100%;
		text-align: center;
		image{
			margin-top: 120rpx;
			width: 496rpx;
			height: 296rpx;
		}
		view{
			margin-top: 20rpx;
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
			line-height: 35rpx;
			text-align: center;
			font-style: normal;
			text-transform: none;
		}
	}
</style>